<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Nav/index')}">菜单列表</a></li>
        <li><a href="{:url('Nav/add')}">添加菜单</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="get" action="{:url('Nav/index')}">
        <input type="text" class="form-control" name="key" style="width: 120px;"  placeholder="支持作者、标题查询">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Nav/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form margin-top-20" action="{:url('Nav/order')}">
        <div class="table-actions">
            <button type="submit" class="btn btn-primary btn-sm js-ajax-submit">排序</button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="16"><label>
                    <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label>
                </th>
                <th width="50">排序</th>
                <th width="50">ID</th>
                <th>标题</th>
                <th>链接</th>

                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="v">
                <tr>
                    <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ides[]" value=""></td>
                    <td><input name='list_orders[{$v.id}]' style="width: 50px" value='{$v.list_order}'></td>
                    <td>{$v.id}</td>
                    <td>{$v.title}</td>
                    <td>{$v.url}</td>

                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('Nav/edit',['id' => $v['id']])}">编辑</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Nav/del',['id' => $v['id']])}">
                            删除
                        </a>
                    </td>
                </tr>
            </foreach>
            <div>
                <div class="pagination">{$list->render()}</div>
                <div>共有{$list->total()}条，每页显示{$list->listRows()}条，当前第{$list->currentPage()}页，共{$list->lastPage()}页。</div>
            </div>

            </tbody>

        </table>
        <div class="pagination"></div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>